#ifndef __GE_SPRITE_H__
#define __GE_SPRITE_H__
#include "GE_Base.h"
namespace Syp
{
	///Sprite is a wrapper class over NIndexedMesh which simplifies many Sprite related tasks. It is still intended to be used in conjunction with MeshInstances.
	class SYPAPI Sprite : public NIndexedMesh
	{
	public:
		///Creates a Sprite object and returns a pointer to it. You may also optionally specify a matIndex which will
		///be used to select a different subMaterial from a Material file which contains more than 1 subMaterial. Syp will attempt
		/// to deduce the width and height of the Sprite from the texture's native width and height. However you may specify any other
		///width and height values to scale the Sprite accordingly.
		static Sprite* createSprite(const String& name, PShort matIndex = 0, float width = 0, float height = 0);
		static void destroySprite(Sprite* sprite);
		///Set sprite's dimensions
		void setDimensions(float width, float height);
		///Generates an instance of this sprite
		MeshInstance* genInstance();
	private:
		Sprite(const String& name, PShort matIndex, float width, float height);
		virtual ~Sprite();
		///Material of the sprite
		Material* mat;


	};

}

#endif //__GE_SPRITE_H__
